<?php

namespace App\Http\Controllers;

use App\Models\GrReply;
use App\Models\GrUserComment;
use Dcat\Admin\Support\LazyRenderable;
use Dcat\Admin\Widgets\Table;
use Illuminate\Http\Request;

class DetailReply extends LazyRenderable
{
    public function render()
    {
        // 获取ID
        $id = $this->key;
        $data=GrUserComment::join('gr_reply','gr_user_comment.id','=','gr_reply.comment_id')
            ->where('gr_reply.comment_id',$id)->where('reply_user_id',2)
            ->get(['comment_content','reply_content'])->toArray();
        $titles = [
            '评论内容',
            '恢复内容',
        ];

        return Table::make($titles, $data);
    }


}
